package com.deft.design.combination;

import lombok.extern.slf4j.Slf4j;

/**
 * @author Hide丶love
 * @date 2022/04/27
 **/
@Slf4j
public class EngineController {

    public String process(final String userId, final String userSex, final int userAge) {
        log.info("if else 实现方式判断用户结果。userId：{} userSex:{} userAge:{}", userId, userAge, userAge);
        if ("man".equals(userSex)) {
            if (userAge < 25) {
                return "果实A";
            } else {
                return "果实B";
            }
        }
        if ("woman".equals(userSex)) {
            if (userAge < 25) {
                return "果实C";
            } else {
                return "果实D";
            }
        }
        return null;
    }
}
